﻿using DevelopTool.Model.Enums;

namespace DevelopTool.Model.ChatModels
{
    /// <summary>
    /// 聊天记录
    /// </summary>
    public class ChatRecord : BaseModel
    {
        /// <summary>
        /// 会话类型
        /// </summary>
        public ChatSessionType ChatSessionType { get; set; } = ChatSessionType.User;

        /// <summary>
        /// 聊天消息类型
        /// </summary>
        public ChatMessageType ChatMessageType { get; set; } = ChatMessageType.Text;

        /// <summary>
        /// 文本消息内容
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 文件元数据
        /// </summary>
        public ChatFileMetaData ChatFileMetaData { get; set; }

        /// <summary>
        /// 发送消息的用户
        /// </summary>
        public ChatUser SendUser { get; set; }

        /// <summary>
        /// 接收消息的用户
        /// </summary>
        public ChatUser ReceiverUser { get; set; }

        /// <summary>
        /// 群组（如果是用户间的私聊会话，这个会为空）
        /// </summary>
        public ChatGroup Group { get; set; }

        /// <summary>
        /// 消息发送状态
        /// </summary>
        public ChatMessageSendState SendState { get; set; } = ChatMessageSendState.Success;

        /// <summary>
        /// 响应结果
        /// </summary>
        public string SendResult { get; set; }

        /// <summary>
        /// 是否已读消息（接收方）
        /// </summary>
        public bool IsRead { get; set; } = false;

    }
}
